kernel: net: phy: realtek: replace in-band AN hack
authorDaniel Golle <daniel@makrotopia.org>
Sat, 3 Jan 2026 15:41:17 +0000 (15:41 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Wed, 7 Jan 2026 01:30:26 +0000 (01:30 +0000)
commitdfce21df969b54e237ae3c1ea32b627efa8285f4
tree2aa3993df494e6429885842f1f2ba8da5e3a2d7a
parent5652b98952c4da76060bbe051b521da3dba7164f
kernel: net: phy: realtek: replace in-band AN hack

Replace downstream hack for RealTek PHYs with a more clean solution
which could make it upstream.

As SGMII in-band AN is broken on some platforms, or simply expected to
be disabled by default in phy/sgmii mode (ie. on-board PHYs with MDIO
for out-of-band configuration and status), a hack for the RealTek PHY
driver was introduced to unconditionally disable SGMII in-band
autonegotiation.

Meanwhile the kernel has gained a proper interface for PHY and PCS to
report in-band AN capabilities and enable/disable in-band, matching
PHY and PCS capabilities.

Thanks to Bevan Weiss' knowledge about how RealTek PHY SerDes registers
are being handled in RealTek's SDK this can now be greatly improved:
 - report in-band capabilties
 - let phylink set in-band matching PCS and PHY capabilities
 - properly abstracted indirect access of SerDes registers

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/generic/pending-6.12/720-02-net-phy-realtek-disable-SGMII-in-band-AN-for-2-5G-PHYs.patch [deleted file]
target/linux/generic/pending-6.12/720-02-net-phy-realtek-implement-configuring-in-band-an.patch [new file with mode: 0644]
target/linux/generic/pending-6.12/720-03-net-phy-realtek-make-sure-paged-read-is-protected-by.patch
target/linux/generic/pending-6.12/720-04-net-phy-realtek-setup-aldps.patch
target/linux/generic/pending-6.12/720-05-net-phy-realtek-detect-early-version-of-RTL8221B.patch
target/linux/generic/pending-6.12/720-07-net-phy-realtek-mark-existing-MMDs-as-present.patch
target/linux/generic/pending-6.12/720-09-net-phy-realtek-disable-MDIO-broadcast.patch